import { ISearchBar } from '@ibiz/model-core';
import { CTX, IControlProvider } from '@ibiz-template/runtime';
import { SearchBarExController } from '../../controller';

/**
 * 搜索栏适配器
 *
 * @export
 * @class SearchBarProvider
 * @implements {IControlProvider}
 */
export class SearchBarProvider implements IControlProvider {
  component: string = 'IBizSearchBarControl';

  /**
   * 创建控制器
   *
   * @param {ISearchBar} model
   * @param {IContext} context
   * @param {IParams} params
   * @param {CTX} ctx
   * @return {*}  {SearchBarExController}
   * @memberof SearchBarProvider
   */
  createController(
    model: ISearchBar,
    context: IContext,
    params: IParams,
    ctx: CTX,
  ): SearchBarExController {
    return new SearchBarExController(model, context, params, ctx);
  }
}
